﻿/**********************************************************
 Name：User
 Author：
 Date：2012-08-18 20:49:44
 Description：
 ---------------------------------------------------------
 Modify Date:
 Modify Remark:
 ---------------------------------------------------------
 Modify Date:
 Modify Remark:
**********************************************************/
using System;
using PetaPoco;

namespace QuickLifeHall.Entity.SystemBase
{
    /// <summary>
    /// This Entity is Mapping To [User] Table
    /// Remark Ignore Attribute for the field when it is not need mapping
    /// </summary>
    [Serializable]
    [TableName("User")]
    [PrimaryKey("UserID", autoIncrement = true)]
    public class User
    {
        /// <summary>
        /// UserID
        /// </summary>
        public int UserID
        {
            get;
            set;
        }

        /// <summary>
        /// UserName
        /// </summary>
        public string UserName
        {
            get;
            set;
        }

        /// <summary>
        /// UserPassword
        /// </summary>
        public string UserPassword
        {
            get;
            set;
        }

        /// <summary>
        /// State
        /// </summary>
        public int State
        {
            get;
            set;
        }

        /// <summary>
        /// Equals
        /// </summary>
        public override bool Equals(object obj)
        {
            User other = obj as User;
            if (other == null || this.UserID == 0 || other.UserID == 0)
            {
                return false;
            }
            if (this.UserID != other.UserID)
            {
                return false;
            }
            return true;
        }
        /// <summary>
        /// GetHashCode
        /// </summary>
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}
